package com.tanhua.bg.service;

import com.tanhua.bg.pojo.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MongoService {
    @Autowired
    private MongoTemplate mongoTemplate;

    public List<Log> queryLogList(Query query){
        return mongoTemplate.find(query, Log.class);
    }
}
